{extend name='admin@main'}

{block name="button"}
<button class="layui-btn layui-btn-danger layui-btn-sm" style="float: left;" type='button' onclick="window.history.go(-1)">返回</button>
<button data-modal='{:url("works_form")}?cameraman_id={$cameraman_id}' data-title="添加作品" class='layui-btn layui-btn-sm layui-btn-primary'>添加作品</button>
<button data-action='{:url("del_works")}' data-rule="id#{key}" data-confirm="确定要删除这些吗？" class='layui-btn layui-btn-sm layui-btn-primary'>删除作品</button>

{/block}

{block name="content"}
<table class="layui-table" lay-skin="line">
    <h2>摄影师名称: {$cameraman_name}</h2>
    <!--{notempty name='list'}-->
    <thead>
    <tr>
        <th class='list-table-check-td think-checkbox'>
            <input data-auto-none data-check-target='.list-check-box' type='checkbox'>
        </th>
        <th class='list-table-sort-td'>
            <button type="button" data-reload class="layui-btn layui-btn-xs">刷 新</button>
        </th>
        <th class='text-left nowrap' >作品名称</th>
        <th class='text-left nowrap' >主图<span class="nowrap color-red">340*460</span></th>
        <th class='text-left nowrap' >状态</th>
        <th class='text-left nowrap' >创建时间</th>
        <th >操作</th>
    </tr>
    </thead>
    <!--{/notempty}-->
    <tbody>
    <!--{foreach $list as $key=>$vo}-->
    <tr data-dbclick>
        <td class='list-table-check-td think-checkbox'><input class="list-check-box" value='{$vo.id}' type='checkbox'></td>
        <td class='list-table-sort-td'><input data-action-blur="{:request()->url()}" data-value="id#{$vo.id};action#sort;sort#{value}" data-loading="false" value="{$vo.sort}" class="list-sort-input"></td>
        <td class='text-left'>
            <div class="inline-block">
                {$vo.name|default='--'}
            </div>
        </td>
        <td class='text-left'>
            <img data-tips-image style="width:20px;height:20px" src="{$vo.logo|default=''}" class="margin-right-5 text-top">
        </td>
        <td class='text-left nowrap'>
            <input type="checkbox" data-switch="1#0" data-field="status" data-url="{:url('upworksstatus')}?id={$vo.id}" lay-filter="switch-c-{$vo.id}"
                   {eq name='vo.status' value='1' }checked{/eq} lay-skin="switch"
            lay-text="启用|禁用" value='1'>
        </td>
        <td class='text-left nowrap'>
            {$vo.create_time|default='--'}
        </td>
        <td class='text-left nowrap'>
            <a class="layui-btn layui-btn-sm layui-btn-normal" data-title="编辑" data-modal='{:url("works_form")}?id={$vo.id}'>编 辑</a>
            <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除数据吗?" data-action="{:url('del_works')}" data-value="id#{$vo.id}">删 除</a>
        </td>
    </tr>
    <!--{/foreach}-->
    </tbody>
</table>

{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}

<style>
    table.trim-bottom-border tr:last-child td {
        border: none !important;
    }
</style>

{/block}
